package cn.tedu.fresheveryday.mapper;

import cn.tedu.fresheveryday.pojo.vo.OrderStatusSimpleVO;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderStatusMapper {
    /**
     * 通过id查询订单状态
     * @param id
     * @return
     */
    @Select("select id, name from order_status where id = #{id}")
    OrderStatusSimpleVO selectById(int id);

    /**
     * 查询全部订单状态
     * @return
     */
    @Select("select name from order_status order by id")
    List<String> selectAll();
}